<ng-container *ngIf="group.disabled && !group.value.name; else elseRef">
  <span class="text-gray">无</span>
</ng-container>
<ng-template #elseRef>
  <ng-container>
    <ng-container *ngIf="group.value?.name">
      <span class="name">{{ group.value?.name }}</span>
    </ng-container>
    <ng-container *ngIf="group.value?.name">
      <span class="desc">{{ transformObjToString(group.value?.upload_at) | date }}</span>
    </ng-container>
    <div>
      <ng-container *ngIf="group.value?.name">
        <button
          class="btn btn-sm btn-secondary mr-3"
          *ngIf="group.value?.name"
          (click)="onView()"
        >
          {{viewBtnText}}
        </button>
      </ng-container>


      <ng-container *ngIf="!group.disabled">
        <button class="btn btn-sm btn-danger mr-3" *ngIf="group.value?.name" (click)="onClear()">
          删除
        </button>
        <button class="btn btn-sm btn-primary mr-3" (click)="downTempTo()" *ngIf="orther">
            {{orther}}
        </button>
        <button class="btn btn-sm btn-secondary " (click)="selectFile()">
          {{btnText}}
        </button>
      </ng-container>
    </div>
  </ng-container>
</ng-template>
<ng-template #viewRef>
  <div class="modal-header">
    <h3>{{ group.value.name }} - 内容查看</h3>
  </div>
  <div class="modal-body view">
    <perfect-scrollbar>
      <ng-container *ngIf="group.value.content.startsWith('blob:'); else contentDataRef">
        <ng-container *ngIf="group.value.content | fetch | async as content; else progressRef">
          <code>{{ content }}</code>
        </ng-container>
        <ng-template #progressRef>
          <div class="spinner-container">
            <mat-spinner></mat-spinner>
          </div>
        </ng-template>
      </ng-container>
      <ng-template #contentDataRef>
        <code>{{ group.value.content }}</code>
      </ng-template>
    </perfect-scrollbar>
  </div>
</ng-template>
